<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Vue插件</title>
    <style>
        * {
            margin: 0px;
            padding: 0px;
            list-style: none;
        }

        [v-cloak] {
            display: none;
        }

        .tabbar {
            display: flex;
            justify-content: space-between;
            position: fixed;
            bottom: 0px;
            width: 100vw;
            height: 50px;
            align-items: center;
        }

        .tabbar div {
            width: 25%;
            text-align: center;
        }

        .router-link-exact-active.router-link-active {
            color: green;
        }
    </style>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.css" rel="stylesheet">
</head>

<body>
    <div id="app" v-cloak style="width: 100%;max-width:640px;margin:0px auto;height: 100vh;">
        <div class="tabbar">
            <router-link to="msg" tag="div">
                <i class="fa fa-comments" aria-hidden="true"></i>
                <br />
                消息</router-link>
            <router-link :to="{ name: 'fri'}" tag="div"> <i class="fa fa-address-book-o" aria-hidden="true"></i>
                <br />通讯录</router-link>
            <router-link to="/find" tag="div"> <i class="fa fa-bandcamp" aria-hidden="true"></i>
                <br />发现</router-link>
            <router-link to="/mine" tag="div"> <i class="fa fa-user" aria-hidden="true"></i>
                <br />我的</router-link>
        </div>

        <div style="height:calc(100vh - 50px);overflow-y: scroll">
            <router-view></router-view>
        </div>
    </div>
    <script src="https://cdn.bootcss.com/vue/2.6.6/vue.js"></script>
    <script src="https://unpkg.com/vue-router@3.0.2/dist/vue-router.js"></script>
    <script src="https://unpkg.com/axios/dist/axios.min.js"></script>
    <script src="views/xiaoxi.js"></script>
    <script src="views/friends.js"></script>
    <script src="views/mine.js"></script>
    <script src="views/find.js"></script>
    <script src="views/chat.js"></script>
    <script src="views/login.js"></script>
    <script src="routes/routes.js"></script>
    <script>
        var vm = new Vue({
            el: "#app",
            mounted() {
                //location.href
                this.$router.push('/msg')
            },
            router
        })
    </script>


</body>

</html>